package com.fdway.action;

import java.util.ArrayList;

import com.fdway.po.Content;
import com.fdway.po.ContentDAO;
import com.fdway.po.Contype;
import com.fdway.po.ContypeDAO;
import com.video.BaseAction;

public class MainAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private ArrayList<Contype> listty=null;
	private ArrayList<Content> list1=null;
	private ArrayList<Content> list2=null;
	private ArrayList<Content> list3=null;
	private ArrayList<Content> list4=null;
	private ArrayList<Content> list5=null;
	private ArrayList<Content> list6=null;

	@SuppressWarnings("unchecked")
	public String initMain(){
		ContypeDAO contydao=new ContypeDAO();
		ContentDAO condao=new ContentDAO();
		listty=(ArrayList<Contype>) contydao.findAll();
		list1=(ArrayList<Content>) condao.findTop6ByTyid(new Long(1));
		list2=(ArrayList<Content>) condao.findTop6ByTyid(new Long(2));
		list3=(ArrayList<Content>) condao.findTop6ByTyid(new Long(3));
		list4=(ArrayList<Content>) condao.findTop6ByTyid(new Long(4));
	    return SUCCESS;	
	}

	public ArrayList<Contype> getListty() {
		return listty;
	}

	public void setListty(ArrayList<Contype> listty) {
		this.listty = listty;
	}

	public ArrayList<Content> getList1() {
		return list1;
	}

	public void setList1(ArrayList<Content> list1) {
		this.list1 = list1;
	}

	public ArrayList<Content> getList2() {
		return list2;
	}

	public void setList2(ArrayList<Content> list2) {
		this.list2 = list2;
	}

	public ArrayList<Content> getList3() {
		return list3;
	}

	public void setList3(ArrayList<Content> list3) {
		this.list3 = list3;
	}

	public ArrayList<Content> getList4() {
		return list4;
	}

	public void setList4(ArrayList<Content> list4) {
		this.list4 = list4;
	}

	public ArrayList<Content> getList5() {
		return list5;
	}

	public void setList5(ArrayList<Content> list5) {
		this.list5 = list5;
	}

	public ArrayList<Content> getList6() {
		return list6;
	}

	public void setList6(ArrayList<Content> list6) {
		this.list6 = list6;
	}

	
}
